{% extends "base.html" %}
{% load common_filters %}
{% load static %}
{% load crispy_forms_tags %}

{% block title %}
    Teacher Dashboard | {{ block.super }}
{% endblock title %}

{% block stylesheets %}
    {{ block.super }}
    <!-- Custom styles for this template -->
    <link href="{% static "laioffer/css/dashboard.css" %}" rel="stylesheet">
    <link href="{% static "hljs/default.min.css" %}" rel="stylesheet">
    <script type="text/javascript" src="{% static "hljs/highlight.min.js" %}"></script>
{% endblock stylesheets %}

{% block content %}

    <div class="container-fluid">
      <div class="row">

        {% include "_sidebar.html" %}

        <div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
          <h1 class="page-header">Teacher Dashboardd</h1>

          {% include "_message.html" %}

          <h2 class="sub-header">{{ view.section_title }}</h2>

          <h3>{{ user.username }}</h3>
          current cv:
          {% if user.cv %}
          <a href="{{ user.cv.url }}">{{ user.cv.name }}</a>
          {% else %}
          no cv uploaded yet
          {% endif %}

          <h3>Add comment</h3>
            <form method="post">
              {% csrf_token %}
              {{ form|crispy }}
              <button type="submit">Add</button>
              <a href="javascript:history.back()">Cancel</a>
            </form>

          <h3>Previous comments</h3>
          {%  for comment in comments %}
          <p>{{ comment.text }}</p>
          {%  endfor %}

        </div> <!-- /main -->
      </div> <!-- /row -->
    </div> <!-- /container -->

    <script type="text/javascript">
        hljs.initHighlightingOnLoad();
    </script>

{% endblock content %}
